export abstract class BaseGame{
  _points: number = 0;
  _level: number = 1;
  _data: Array<Array<number>> = Array<Array<number>>();
  _mask: Array<Array<number>> = Array<Array<number>>();
  _mixed: Array<Array<number>> = Array<Array<number>>();

  constructor() {
    for (let i = 0; i < GAME_PAD_MATRIX_H; i++) {
      this._data.push(Array(GAME_PAD_MATRIX_W).fill(0));
      this._mask.push(Array(GAME_PAD_MATRIX_W).fill(0));
    }
  }

  abstract clickL()
  abstract clickR()
  abstract clickU()
  abstract clickD()
  abstract clickConfirm()
  abstract pause()
  abstract start()
  abstract startOrPause()
  abstract reset()
}

///the width of game pad
export const GAME_PAD_MATRIX_W = 10;
///the height of game pad
export const GAME_PAD_MATRIX_H = 20;

export const _LEVEL_MAX = 6;

export const _LEVEL_MIN = 1;

export const _SPEED: number[] = [
  800,
  650,
  500,
  370,
  250,
  160,
];

export enum GameStates {
  none,
  paused,
  running,
  reset,
  mixing,
  clear,
  drop,
}

export const _REST_LINE_DURATION = 50;

